<div id="header">
	<a href="index.php"><img src="images/logo/text-only/logo-spearmint.png" /></a>
    <span><?php echo $stats['total_recipes'];?> recipes and <?php echo $stats['total_users'];?> users</span>       
    <ul id="nav">
    <?php if($user_id):?>
    	<li>
        	<img src="http://www.gravatar.com/avatar/<?php echo md5( strtolower( trim($user_email) ) );?>" width=40 height=40 title="<?php echo $user_email;?>" /> 
        </li>
        <!--<li>
            <a href="profile.php"><?php echo $nickname;?>'s Profile</a>
        </li>-->
        <li>
            <?php echo $nickname;?>
        </li>
        <li>
            <a href="latest-activity.php">Latest Activity</a>
        </li>
        <li>
            <a href="friends.php">Friends</a>
        </li>
        <li>
            <a href="recipes.php">Recipes</a>
        </li>
        <li>
            <a href="demo.php">Demos</a>
        </li>
        <?php if($admin):?>
        <li>
            <a href="admin.php">Admin</a>
        </li>
        <?php endif;?>
        <li>
            <a onClick="logout()">Logout</a>
        </li>
    <?php endif;?>
        
    </ul><!--nav-->        
</div><!--header-->